package com.zzyl.nursing.service.impl;

import java.util.Arrays;
import java.util.List;
import com.zzyl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zzyl.nursing.mapper.MemberReservationMapper;
import com.zzyl.nursing.domain.MemberReservation;
import com.zzyl.nursing.service.IMemberReservationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 预约信息Service业务层处理
 * 
 * @author alexis
 * @date 2025-01-11
 */
@Service
public class MemberReservationServiceImpl extends ServiceImpl<MemberReservationMapper, MemberReservation> implements IMemberReservationService
{
    @Autowired
    private MemberReservationMapper memberReservationMapper;

    /**
     * 查询预约信息
     * 
     * @param id 预约信息主键
     * @return 预约信息
     */
    @Override
    public MemberReservation selectMemberReservationById(Long id)
    {
        return memberReservationMapper.selectById(id);
    }

    /**
     * 查询预约信息列表
     * 
     * @param memberReservation 预约信息
     * @return 预约信息
     */
    @Override
    public List<MemberReservation> selectMemberReservationList(MemberReservation memberReservation)
    {
        return memberReservationMapper.selectMemberReservationList(memberReservation);
    }

    /**
     * 新增预约信息
     * 
     * @param memberReservation 预约信息
     * @return 结果
     */
    @Override
    public int insertMemberReservation(MemberReservation memberReservation)
    {
        return memberReservationMapper.insert(memberReservation);
    }

    /**
     * 修改预约信息
     * 
     * @param memberReservation 预约信息
     * @return 结果
     */
    @Override
    public int updateMemberReservation(MemberReservation memberReservation)
    {
        return memberReservationMapper.updateById(memberReservation);
    }

    /**
     * 批量删除预约信息
     * 
     * @param ids 需要删除的预约信息主键
     * @return 结果
     */
    @Override
    public int deleteMemberReservationByIds(Long[] ids)
    {
        return memberReservationMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除预约信息信息
     * 
     * @param id 预约信息主键
     * @return 结果
     */
    @Override
    public int deleteMemberReservationById(Long id)
    {
        return memberReservationMapper.deleteById(id);
    }
}
